Skip to content

Fix wrong Gtk.Widget.get_ancestor signature#217

Merged
lovetox merged 4 commits intopygobject:masterfrom
really-not-lavacat:gtk-get-ancestor-generic
Jun 16, 2025
Merged

Fix wrong Gtk.Widget.get_ancestor signature#217
lovetox merged 4 commits intopygobject:masterfrom
really-not-lavacat:gtk-get-ancestor-generic

Conversation

@really-not-lavacat
Copy link
Copy Markdown
Contributor

Hi! Sorry to open new PR after my previous one was merged, but I found out that my previous PR was slightly incorrect: for code analyzers, it looked like get_ancestor accepts type and returns type (or accepts instance and returns instance), which resulted in strange error for get_ancestor(Gtk.Button):

Type "type[Button]" is not assignable to declared type "Widget"

Now I edited get_ancestor, so it accepts type and returns instance (or None), which is correct.

Sorry again

@lovetox
Copy link
Copy Markdown
Collaborator

lovetox commented Jun 16, 2025

i think you need to fix your branch, this is not mergable

@really-not-lavacat
Copy link
Copy Markdown
Contributor Author

Somehow I resolved conflicts, seems to be mergable now

@lovetox lovetox merged commit c49c485 into pygobject:master Jun 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants